package com.xnx3.banmahuishou.core.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.xnx3.j2ee.entity.BaseEntity;

/**
 * 网格信息表，相当于user表的延伸扩展
 * @author 王晓龙
 */
@Entity()
@Table(name = "laji_wangge")
public class Wangge extends BaseEntity implements java.io.Serializable  {
	/**
	 * 网格状态 1正常
	 */
	public static final Short STATE_NORMAL = 1;
	/**
	 * 网格状态 2冻结
	 */
	public static final Short STATE_FROZEN = 2;
	
	private Integer id;	//网格用户id,关联user.id
	private String name;	//网格的名称
	private String dailishangUsername;	//代理商名称,关联user.nickname
	private Integer dailishangUserid;	//代理商用户id,关联user.id
	private String serviceArea;	//服务范围，这是一组经纬度列表，格式如 [{119.20762333333333, 36.68714333333333},{119.20762333333333, 36.68714333333333}] 用这个在地图上圈起一片服务的区域来
	private String username;	//负责人姓名
	private String phone;	//网格的联系电话。编辑这个电话时会将 wangge.phone 、 user.phone 这两个字段都要进行更新
	private Integer addtime;	//网格的注册时间，加入时间,十位数时间戳
	private Integer money;	//网格账户余额，单位是分
	private Short state;	//网格状态，1正常；2冻结
	private Integer qishouNum;	//网格下的骑手数量
	
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "name", columnDefinition="char(60) COLLATE utf8mb4_unicode_ci COMMENT '网格的名称' default ''")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "dailishang_username", columnDefinition="char(60) COLLATE utf8mb4_unicode_ci COMMENT '代理商名称,关联user.nickname' default ''")
	public String getDailishangUsername() {
		return dailishangUsername;
	}
	public void setDailishangUsername(String dailishangUsername) {
		this.dailishangUsername = dailishangUsername;
	}
	@Column(name = "dailishang_userid", columnDefinition="int(11) COMMENT '代理商用户id,关联user.id' default '0'")
	public Integer getDailishangUserid() {
		return dailishangUserid;
	}
	public void setDailishangUserid(Integer dailishangUserid) {
		this.dailishangUserid = dailishangUserid;
	}
	@Column(name = "service_area", columnDefinition="char(255) COLLATE utf8mb4_unicode_ci COMMENT '服务范围，这是一组经纬度列表，格式如 [{123,234},{111,333}] 用这个在地图上圈起一片服务的区域来' default ''")
	public String getServiceArea() {
		return serviceArea;
	}
	public void setServiceArea(String serviceArea) {
		this.serviceArea = serviceArea;
	}
	@Column(name = "username", columnDefinition="char(30) COLLATE utf8mb4_unicode_ci COMMENT '负责人姓名' default ''")
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	@Column(name = "phone", columnDefinition="char(11) COLLATE utf8mb4_unicode_ci COMMENT '网格的联系电话。编辑这个电话时会将 wangge.phone 、 user.phone 这两个字段都要进行更新' default ''")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@Column(name = "addtime", columnDefinition="int(11) COMMENT '网格的注册时间，加入时间,十位数时间戳' default '0'")
	public Integer getAddtime() {
		return addtime;
	}
	public void setAddtime(Integer addtime) {
		this.addtime = addtime;
	}
	@Column(name = "money", columnDefinition="int(11) COMMENT '网格账户余额，单位是分' default '0'")
	public Integer getMoney() {
		return money;
	}
	public void setMoney(Integer money) {
		this.money = money;
	}
	@Column(name = "state", columnDefinition="tinyint(3) COMMENT '网格状态，1正常；2冻结' default '0'")
	public Short getState() {
		return state;
	}
	public void setState(Short state) {
		this.state = state;
	}
	@Column(name = "qishou_num", columnDefinition="int(11) COMMENT '网格下的骑手数量' default '0'")
	public Integer getQishouNum() {
		return qishouNum;
	}
	public void setQishouNum(Integer qishouNum) {
		this.qishouNum = qishouNum;
	}
	@Override
	public String toString() {
		return "Wangge [id=" + id + ", name=" + name + ", dailishangUsername=" + dailishangUsername
				+ ", dailishangUserid=" + dailishangUserid + ", serviceArea=" + serviceArea + ", username=" + username
				+ ", phone=" + phone + ", addtime=" + addtime + ", money=" + money + ", state=" + state + ", qishouNum="
				+ qishouNum + "]";
	}
	
}
